package com.lingyue.entity.module.def.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lingyue.entity.groups.Create;
import com.lingyue.entity.groups.Modify;
import com.lingyue.entity.groups.tag.UpdateTagFlag;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author deep
 * @version 1.0 on 2020-01-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tag")
@ApiModel(value = "TagEntity对象", description = "")
public class TagEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @NotNull(groups = {Modify.class, UpdateTagFlag.class}, message = "标签ID不能为空")
    @TableId(value = "TAG_ID", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "标签编码")
    @TableField("TAG_CODE")
    private String code;

    @ApiModelProperty(value = "标签内容")
    @NotNull(groups = {Create.class, Modify.class}, message = "标签内容不能为空")
    @TableField("TAG_TEXT")
    protected String text;

    @ApiModelProperty(value = "标签类型：客户标签、车辆标签")
    @NotNull(groups = {Create.class, Modify.class}, message = "标签类型不能为空")
    @TableField("TAG_TYPE")
    private String type;

    @ApiModelProperty(value = "标签状态：Y/可用 N/不可用")
    @NotNull(groups = {UpdateTagFlag.class}, message = "标签状态不能为空")
    @TableField("TAG_STATUS")
    private String status;

    @ApiModelProperty(value = "经销商ID")
    @TableField("TAG_DEL_ID")
    private Long delId;

    @ApiModelProperty(value = "数据来源\r\n车辆标签：BATCH/ASSISTANT")
    @TableField("TAG_DATA_SOURCE")
    private String dataSource;

    @TableField("TAG_CREATE_USER")
    private String createUser;

    @TableField("TAG_CREATE_DATE")
    private LocalDateTime createDate;

    @TableField("TAG_UPDATE_USER")
    private String updateUser;

    @TableField("TAG_UPDATE_DATE")
    private LocalDateTime updateDate;

    public static final String TAG_ID = "TAG_ID";
    public static final String TAG_CODE = "TAG_CODE";
    public static final String TAG_TEXT = "TAG_TEXT";
    public static final String TAG_TYPE = "TAG_TYPE";
    public static final String TAG_STATUS = "TAG_STATUS";
    public static final String TAG_DEL_ID = "TAG_DEL_ID";
    public static final String TAG_DATA_SOURCE = "TAG_DATA_SOURCE";
    public static final String TAG_CREATE_USER = "TAG_CREATE_USER";
    public static final String TAG_CREATE_DATE = "TAG_CREATE_DATE";
    public static final String TAG_UPDATE_USER = "TAG_UPDATE_USER";
    public static final String TAG_UPDATE_DATE = "TAG_UPDATE_DATE";
}
